<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{$site_title}</title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.css" />
  <link rel="stylesheet" type="text/css" href="{$resource_basic}/css/webapp.css" />
  <script type="text/javascript" src="{$resource_basic}/js/jquery.min.js"></script>
  <script type="text/javascript" src="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.js"></script>
  <script type="text/javascript">
    window.boost = $.noConflict(true);
    </script>
 <style>
     .blend-panel{background-color: #fff;}
      .sponsor_lists [class*=col-]{background-color: #b9e3d9;border: none; margin-top: 1em;}
      .sponsor_pay [class*=col-]{background-color: #fff;border: none; margin-top: 1em;}
      .sponsor_pay .blend-button-primary{background-color: #fff; border: #03ab9e 1px solid; color: #000;}
      .sponsor_pay .blend-button-primary_focus{background-color: #03ab9e;}
    .blend-card-img-view img{
                width: 65%; 
                height: 65%;
            }
    .pay_item{ height: 32px; width: 90%; padding: 5px;}
    .blend-col-4{ width: 20%; padding: 0;}
    .blend-card_s{
         border-bottom:solid 0 #fff;
    }
    .blend-card{
        border-bottom: none;
    }
  </style>
</head>

<body>
<header data-blend-widget="header" class="blend-header header_title_bg">
    <span class="blend-header-left">
            <a class="blend-header-item  blend-button" href="javascript:history.go(-1);"><img src="{$resource_basic}/img/btn_back.png" style="height:28px;"/></a>
        </span>
    <span class="blend-header-title">
        <a class="blend-header-item">确认支付</a>
    </span>
    <span class="blend-header-right">
    </span>
</header>
<form action="{:U('publish_money_confirm')}" method="post" id="myform">
    <div class="blend-card blend-card-no-icon blend-card_s" style="margin-bottom:7px;">
        <div class="blend-card-content-view" style="margin-left: 10px;">
            <div class="blend-card-title" style=" font-size:1.7rem; color:#545454;">
            <b>{$fd_info.pjname}</b>
            </div>
            <div class="blend-card-title" style=" font-size:1.3rem; margin-top:7px;">
            发起人:{$founding_username}
            </div>
        </div>
    </div>
    <div class="blend-card blend-card-no-icon" style="position: relative; height: 70px;">
        <div class="blend-card-img-view" style=" font-size:1.6rem; float: left; text-align: center; position: relative;top:20%; left:-4px;">
            支持:
        </div>
        <div class="blend-card-content-view">
            <div class="blend-grid blend-container-fluid sponsor_pay">
                <div class="blend-row">
                    <span class="blend-col-4">
                        <button type='button' class="blend-button blend-button-primary blend-button-xs pay_item blend-button-primary_focus" data-money='10'>&nbsp;&nbsp;10元</button>
                    </span>
                    <span class="blend-col-4">
                        <button type='button' class="blend-button blend-button-primary blend-button-xs pay_item"  data-money='20'>20元</button>
                    </span>
                    <span class="blend-col-4">
                        <button type='button' class="blend-button blend-button-primary blend-button-xs pay_item" data-money='50'>50元</button>
                    </span>
                    <span class="blend-col-4">
                        <button type='button' class="blend-button blend-button-primary blend-button-xs pay_item" data-money='100'>100元</button>
                    </span>
                </div>

            </div>
        </div>
    </div>
    
    <div class="blend-panel">
        <div class="blend-panel-body blend-panel-center">
            <input type="number" name="donate_other_money" id="donate_other_money" placeholder="自定义金额"  style="border: 1px solid #ddd;width: 57%;"/>元
            <input type="hidden" name="donate_money" id="donate_money" placeholder="输入金额" value="10" style="border: 1px solid #ddd;width: 57%;"/>
        </div>
    </div>
    <input type="hidden" name="fdid" value="{$fdid}" />
    <div class="div_gap"></div>
    <div class="blend-panel">
        <div class="blend-panel-header blend-panel-left">
            支付金额: <span style="color:red" >￥</span><span style="color:red" id='money_to_pay'>10</span>
        </div>
    </div>
</form>
    <div class="blend-card blend-card-no-icon" style="height:100px; position: relative;">
            <div class="blend-card-img-view" style=" float: left; text-align: center; position: relative;top:10%;">
                <img src="{$resource_basic}img/payment_wechat.png">
            </div>
            <div class="blend-card-content-view" style="width:150px;">
                <div class="blend-card-title">
                    <h4>微信支付</h4>
                </div>
            </div>

            <div class="blend-card-img-view" style=" float: right;  right: 10px;text-align: center; top:30px;position: absolute;">
                <img src="{$resource_basic}img/payment_checked.png" style='width:30%; height:30%;'>
            </div>
        </div>
    <div class="blend-panel">
        <div class="blend-panel-body">
          <button class="blend-button blend-button-primary blend-button-large wx-pay-btn" style=" background-color:#03ab9e;">微信支付</button>  
            
        </div>
    </div>
</body>
<script>
$(function(){
    sessionStorage.clear();
    
    $(".pay_item").on("click",function(){
        var money_to_pay = $(this).attr("data-money");
        $("#money_to_pay").text(money_to_pay);
        $("#donate_money").val(money_to_pay);
        $("#donate_other_money").val("");
        
        /*
         * 清除其他的样式
         */
        $(".pay_item").removeClass("blend-button-primary_focus");
        $(this).addClass("blend-button-primary_focus");
        
    });
    
    $("#donate_other_money").bind('input propertychange', function() {
        console.log($(this).val());
        $("#donate_money").val($(this).val());
        $("#money_to_pay").text($(this).val());
        
        $(".pay_item").removeClass("blend-button-primary_focus");
    });
});
// 加载的loading...
 document.onreadystatechange = subSomething;//当页面加载状态改变的时候执行这个方法. 
    function subSomething() 
    { 
        if(document.readyState === "complete") //当页面加载状态 
        {
            close_loading();

        }
    }
 
    function open_loading()
    {
        var loading = boost.blend.loading();
        loading.show();
    }
    
    function close_loading()
    {
        $('.blend-loading').hide();
    }
</script>
<!--取出来本地存储的信息，提交到服务器，得到返回结果再显示-->
<script type="text/javascript">   
        
        $(function() {
            $('.wx-pay-btn').on('click', function() {
                
                //判断金额的输入
                var price = $("#donate_money").val();
                
                var reg = /^[0-9]*[1-9][0-9]*$/;
         
                var strNumber = $("#donate_money").val();
                if(reg.test(strNumber))
                {
                    if(price>=10)
                    {
                        $("#myform").submit();
                    }
                    else
                    {
                        alert("温馨提示：领投众测项目10元起");
                    }
                }
                else
                {
                    alert("请输入整数金额");
                }
                
              });
            });
</script>
<include file="Index/foot_analyze"/>
<?php require_once 'cs.php';echo '<img src="'._cnzzTrackPageView(1256622573).'" width="0" height="0"/>';?>
</body>
</html>